package dbexp.test;

import java.util.List;
import java.util.Vector;

import dbexp.utils.StringUtil;
import dbexp.utils.Tool;

@SuppressWarnings("unchecked")
public class Utiltest {

	public static void main(String[] args) {
		Vector vec = new Vector();
		vec.add(0, "dsd");
		vec.add(1, "dfdf");
		vec.add(2, "dfsdad");
		vec.add(3, "agdfgsd");
		vec.add(4, "gdshsd");
		vec.add(5, "dhsh4ghs");
		for (int i = 0; i < vec.size(); i++) {
			System.out.println(vec.get(i));
		}
		@SuppressWarnings("unused")
		Tool[] tools = new Tool[] { Tool.normalize(0, '*') };
		@SuppressWarnings("unused")
		Tool appendOnEnd = Tool.appendOnEnd("_");
		@SuppressWarnings("unused")
		Tool appendOnEndNR = Tool.appendOnEnd("$nr");
		@SuppressWarnings("unused")
		Tool appendOnEndNull = Tool.appendOnEnd(null);

		@SuppressWarnings("unused")
		Tool appendOnStart = Tool.appendOnStart("-");
		@SuppressWarnings("unused")
		Tool appendOnStartNR = Tool.appendOnStart("$nr");
		@SuppressWarnings("unused")
		Tool appendOnStartNull = Tool.appendOnStart(null);

		@SuppressWarnings("unused")
		Tool cut = Tool.cut(5);
		@SuppressWarnings("unused")
		Tool cut0 = Tool.cut(0);
		@SuppressWarnings("unused")
		Tool cut_ = Tool.cut(-5);
		@SuppressWarnings("unused")
		Tool fltu = Tool.fltu();
		@SuppressWarnings("unused")
		Tool fltuET = Tool.fltu(true);
		@SuppressWarnings("unused")
		Tool fltuEF = Tool.fltu(false);
		Tool lower = Tool.lower();
		@SuppressWarnings("unused")
		Tool normalize = Tool.normalize(10);
		@SuppressWarnings("unused")
		Tool normalize0 = Tool.normalize(0);
		@SuppressWarnings("unused")
		Tool normalize_ = Tool.normalize(-10);
		@SuppressWarnings("unused")
		Tool normalizeAdd = Tool.normalize(10, '*');
		@SuppressWarnings("unused")
		Tool normalizeAdd0 = Tool.normalize(0, '*');
		@SuppressWarnings("unused")
		Tool normalizeAdd_ = Tool.normalize(-10, '*');

		@SuppressWarnings("unused")
		Tool oltl = Tool.oltl();

		@SuppressWarnings("unused")
		Tool replaceAll = Tool.replaceAll("a", "b");
		@SuppressWarnings("unused")
		Tool replaceAllANull = Tool.replaceAll(null, "b");
		@SuppressWarnings("unused")
		Tool replaceAllBNull = Tool.replaceAll("a", null);
		@SuppressWarnings("unused")
		Tool replaceAllNull = Tool.replaceAll(null, null);

		@SuppressWarnings("unused")
		Tool replaceFirst = Tool.replaceFirst("a", "b");
		@SuppressWarnings("unused")
		Tool replaceFirstANull = Tool.replaceFirst(null, "b");
		@SuppressWarnings("unused")
		Tool replaceFirstBNull = Tool.replaceFirst("a", null);
		@SuppressWarnings("unused")
		Tool replaceFirstNull = Tool.replaceFirst(null, null);

		@SuppressWarnings("unused")
		Tool replaceLast = Tool.replaceLast("a", "b");
		@SuppressWarnings("unused")
		Tool replaceLastANull = Tool.replaceLast(null, "b");
		@SuppressWarnings("unused")
		Tool replaceLastBNull = Tool.replaceLast("a", null);
		@SuppressWarnings("unused")
		Tool replaceLastNull = Tool.replaceLast(null, null);

		@SuppressWarnings("unused")
		Tool reverse = Tool.reverse();
		@SuppressWarnings("unused")
		Tool trim = Tool.trim();
		@SuppressWarnings("unused")
		Tool upper = Tool.upper();
		lower = null;
		String oucik = StringUtil.join(vec, lower);
		System.out.println("Wynik działania programu:  '" + oucik + "'");

		System.out.println();
		System.out.println();
		System.out.println();
		List<String> vec2 = StringUtil.getList(oucik);
		System.out.println(vec2.toString());

	}

}
